﻿using System.IO;
using System.Media;
using System.Windows;

namespace Bildschirmpause {
    /// <summary>
    /// Interaction logic for PauseWindow.xaml
    /// </summary>
    public partial class PauseWindow : Window {
        public PauseWindow() {
            InitializeComponent();
        }

        private void TextBlock_MouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e) {
            this.Close();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e) {
            try {
                if (File.Exists("alert.wav")) {
                    using (SoundPlayer soundPlayer = new SoundPlayer("alert.wav")) {
                        soundPlayer.Play();
                    }
                }
            } catch {
            }
        }
    }
}
